﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="EasyBus-Configuration"
    targetNamespace="http://www.workstation.co.jp/EasyBus-Configuration.xsd"
    elementFormDefault="qualified"
    xmlns="http://www.workstation.co.jp/EasyBus-Configuration.xsd"
    xmlns:mstns="http://www.workstation.co.jp/EasyBus-Configuration.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
  <xs:element name="easybus-config">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="bus" maxOccurs="unbounded">
          <xs:complexType>
            <xs:all>
              <xs:element name="endpoint-setting" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="endpoint" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
                        <xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="publish-setting" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="publish" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:attribute name="routeKey" type="xs:string" use="required"></xs:attribute>
                        <xs:attribute name="description" type="xs:string"></xs:attribute>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="subscribe-setting" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="subscribe" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="listener" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="handle" maxOccurs="unbounded">
                                  <xs:complexType>
                                    <xs:attribute name="name" use="required"></xs:attribute>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                              <xs:attribute name="processThreadCount" type="xs:int"></xs:attribute>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                        <xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
                        <xs:attribute name="routeKey" type="xs:string" use="required"></xs:attribute>
                        <xs:attribute name="busName" type="xs:string" use="required"></xs:attribute>
                        <xs:attribute name="endpointName" type="xs:string" use="required"></xs:attribute>
                        <xs:attribute name="description" type="xs:string"></xs:attribute>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:all>
            <xs:attribute name="name" use="required" type="xs:string"></xs:attribute>
            <xs:attribute name="nodeName" type="xs:string"></xs:attribute>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
